import { markRaw } from 'vue';
import { RouteRecordRaw } from 'vue-router';
import RouterTransition from '@/components/routerTransition.vue';

const routeName = 'equipment';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/equipment',
        name: routeName,
        redirect: '/equipment/esl',
        component: markRaw(RouterTransition),
        meta: {
            title: 'yl.equipmentMgt',
            icon: 'ClusterOutlined',
        },
        children: [
            {
                path: 'esl',
                name: `${routeName}-esl`,
                meta: {
                    title: 'yl.eslManage',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "equipment" */ '@/views/equipment/eslHeartbeat/index.vue'),
            },
            {
                path: 'ap',
                name: `${routeName}-ap`,
                meta: {
                    title: 'yl.apManage',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "equipment" */ '@/views/equipment/apHeartbeat/index.vue'),
            },
            {
                path: 'lcd',
                name: `${routeName}-lcd`,
                meta: {
                    title: 'yl.lcdManage',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "equipment" */ '@/views/equipment/lcdHeartbeat/index.vue'),
            },
        ],
    },
];

export default routes;
